#include "main.h"
#include "test4.h"

struct BaseClass
{
  virtual int virtual_method()
  {
    printf("We are in BaseClass\n");
    return 0;
  }
};

struct DerivedClass : public virtual BaseClass
{
  virtual int virtual_method()
  {
    printf("We are in DerivedClass1\n");
    return 1;
  }
};

void test4()
{
  fd::delegate0<int> d;
  DerivedClass derivedObject;
  d.bind(&DerivedClass::virtual_method, &derivedObject);
  d();
}
